package com.my.test.design.chainofresponsibility;

public abstract class Leader {

    private String name;

    // 责任链的关键，指向下一个接点
    private Leader nextLeader;

    public abstract void handRequest(Request request);


   public Leader(String name){
       this.name = name;
   }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Leader getNextLeader() {
        return nextLeader;
    }

    public void setNextLeader(Leader nextLeader) {
        this.nextLeader = nextLeader;
    }
}
